<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Plugins\Sms\SendInfo;

class SendCompanyMessage implements ShouldQueue
{
    use InteractsWithQueue, Queueable, SerializesModels;
    protected $message;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct($companyInfo)
    {
        $this->message = $companyInfo;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        (new SendInfo())->Send(1, $this->message, $this->message['mobile'], null, null);
    }
}
